package org.dromara.system.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.system.domain.TradingRecords;
import org.dromara.system.domain.bo.*;
import org.dromara.system.domain.vo.TradingRecordsVo;

import java.math.BigDecimal;
import java.util.List;

/**
 * 交易记录Mapper接口
 *
 * @author Lion Li
 * @date 2025-07-08
 */
public interface TradingRecordsMapper extends BaseMapperPlus<TradingRecords, TradingRecordsVo> {

    IPage<TradingRecordsVo> findAll(IPage<TradingRecordsVo> page, @Param("query") TradingRecordsBo bo);

    IPage<TradingRecordsVo> findAll(IPage<TradingRecordsVo> page, @Param("query") TradingRecordsBySnBo bo);

    IPage<TradingRecordsVo> findAllBySn(IPage<TradingRecordsVo> page, @Param("query") TradingRecordsBySnBo bo);

    BigDecimal queryTotalTransactionAmount(QueryTradingBo bo);

    BigDecimal queryTransactionAmountByUserId(Long userId);


    List<String> findAmountByMachines();

    List<String> findStageMachine( List<Long> list);


    BigDecimal queryTotalTransactionBySns(@Param("query") QueryTotalTransactionBySnsBo bo);


    IPage<TradingRecordsVo> findAllByBindUserId(IPage<TradingRecordsVo> page,@Param("query") TradingRecordsByBindUserId bo);

    BigDecimal queryTradingTimeByBindUerId(@Param("query") FundsBo bo);
}
